package com.youjie.demo.controller;

import cn.hutool.json.JSONObject;
import com.youjie.demo.util.JPushUtil;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PushController {

  @GetMapping("/push")
  public JSONObject push(String msg) {
    if(!StringUtils.hasText(msg)) {
      return null;
    }
    return JPushUtil.push(msg);
  }

}
